#include <stdio.h>


//typedef struct node
//{
//	long num;
//	struct node* next;
//} Lnode;
void swap(int** a, int** b)
{
	int* temp = *a;
	*a = *b;
	*b = temp;
}
void main()
{
	int c = 2;
	int d = 3;
	int* cp = NULL;
	int* dp = NULL;
	int** cpp = NULL;
	int** dpp = NULL;
	cp = &c;
	dp = &d;
	cpp = &cp;
	dpp = &dp;
	printf("%x\n", *cpp);
	printf("%x\n", *dpp);
	printf("%x\n", cpp);
	printf("%x\n", dpp);
	if (**dpp > **cpp)
		swap(dpp,cpp);
	printf("%x\n", *cpp);
	printf("%x\n", *dpp);
	printf("%x\n", cpp);
	printf("%x\n", dpp);

	printf("%d\n",**cpp);
	printf("%d\n",**dpp);
	getchar();
}